package manage.model;

import m.common.model.FieldMeta;
import m.common.model.Model;
import m.common.model.TableMeta;
import m.common.model.type.FieldType;
import m.common.model.util.ModelQueryList;
import m.system.cache.FlushCache;

@TableMeta(name="os_admin_setting",description="管理员设置表")
public class AdminSetting extends Model implements FlushCache {
    @FieldMeta(name="theme",type= FieldType.STRING,length=20,description="主题")
    private String theme;
    @FieldMeta(name="radius",type= FieldType.INT,description="边角风格")
    private Integer radius;
    @FieldMeta(name="color",type= FieldType.STRING,length=20,description="颜色")
    private String color;

    public String getTheme() {
        return theme;
    }

    public void setTheme(String theme) {
        this.theme = theme;
    }

    public Integer getRadius() {
        return radius;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public void setRadius(Integer radius) {
        this.radius = radius;
    }

    @Override
    public AdminSetting getCacheModel(String key) throws Exception {
        return ModelQueryList.getModel(AdminSetting.class,key,"*");
    }
}
